/*											CMp3Tags
								Written By Dean Thomas - 01/02/2005
				All source code may be used freely and/or modified, if source is used
				in a commercial application then a mention would be nice =)

				Comments/Bugs/Suggestions to Dean.Thomas[AT]Gmail.com
				Hate/Threats/Annoyance to a[at]b.com												*/



									//	Mp3Tags.h
#pragma once

#ifndef _CMP3TAGS_H
#define _CMP3TAGS_H

#include <afx.h>



class CMp3Tags
{
public:
	CMp3Tags(void);
	~CMp3Tags(void);
	
	int OpenFile(LPCTSTR lpFileName);

	void CloseFile() { m_fHandle.Close(); }

	CString GetSongTitle() { return m_strSongTitle; }
	CString GetArtist()	   { return m_strArtist;    }
	CString GetAlbum()	   { return m_strAlbum;     }
	CString GetYear()	   { return m_strYear;      }
	CString GetComment()   { return m_strComment;   }

	int SetSongTitle(LPCTSTR lpSongName);
	int SetArtist(LPCTSTR lpArtist);
	int SetAlbum(LPCTSTR lpAlbum);
	int SetYear(LPCTSTR lpYear);
	int SetComment(LPCTSTR lpComment);

public:
	CFile m_fHandle;
	int m_iFileBytes;

	CString m_strSongTitle;
	CString m_strArtist;
	CString m_strAlbum;
	CString m_strYear;
	CString m_strComment;

public:
#define SONG_TITLE_OFFSET   (m_iFileBytes - 128 + 3)
#define SONG_ARTIST_OFFSET  (m_iFileBytes - 128 + 33)
#define SONG_ALBUM_OFFSET   (m_iFileBytes - 128 + 63)
#define SONG_YEAR_OFFSET	(m_iFileBytes - 128 + 93)
#define SONG_COMMENT_OFFSET (m_iFileBytes - 128 + 97)
};

#endif